package com.example.merchant.entity;

import java.util.List;

/**
 * 订单实体类
 */
public class Order {
    /*
    订单属性
     */
    private Integer id;//编号
    private Double money;//订单价格
    private List<Commodity> commodityList;//商品列表
    private Integer customerId;//下单人id
    // 姓名，电话（冗余字段）
    private String customerName;//下单人
    private Integer customerPhone;//下单人电话

    public Order(){}

    public Order(Integer id, Double money, List<Commodity> commodityList, Integer customerId, String customerName, Integer customerPhone) {
        this.id = id;
        this.money = money;
        this.commodityList = commodityList;
        this.customerId = customerId;
        this.customerName = customerName;
        this.customerPhone = customerPhone;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public List<Commodity> getCommodityList() {
        return commodityList;
    }

    public void setCommodityList(List<Commodity> commodityList) {
        this.commodityList = commodityList;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public Integer getCustomerPhone() {
        return customerPhone;
    }

    public void setCustomerPhone(Integer customerPhone) {
        this.customerPhone = customerPhone;
    }
}
